Quantitative analysis of behavior